package com.woniuxy.demo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 对话消息表
 * </p>
 *
 * @author woniuxy
 * @since 2020-09-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "INSTANT_MESSAGING")
@ApiModel(value="InstantMessaging对象", description="对话消息表")
@AllArgsConstructor
@NoArgsConstructor
public class InstantMessaging implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "每条对话的ID")
    @TableId("MESSAGE_ID")
    private String messageId;

    @ApiModelProperty(value = "消息发送方的ID")
    @TableField("SENDER_ID")
    private String senderId;

    @ApiModelProperty(value = "消息接收方的ID")
    @TableField("RECEIVER_ID")
    private String receiverId;

    @ApiModelProperty(value = "每条消息的内容")
    @TableField("MESSAGE_CONTENT")
    private String messageContent;

    @ApiModelProperty(value = "每条消息发送的插入时间")
    @TableField(value = "CREATE_TIME")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "发送方软删除, 0：消息存在	1：消息被删除")
    @TableField("SENDER_FLAG")
    private Integer senderFlag;

    @ApiModelProperty(value = "接收方软删除. 0：消息存在	1：消息被删除")
    @TableField("RECEIVER_FLAG")
    private Integer receiverFlag;


}
